1. Field of the Invention
The present invention relates to transmission and recovery of a video signal, and more particularly, to a method and an apparatus for transmitting and recovering an error-resilient video signal in an error-prone channel.
2. Description of the Related Art
When an image bit stream is encoded using an H.261, an H.263 ver. 1,2, and 3, or an MPEG-4 encoder, variable length coding (VLC) is used in order to obtain a high compression rate. In this situation, when some bits are erroneous in the bit stream, decoding of the bit stream after the erroneous bit becomes impossible in a decoder. This is called error propagation. In this situation, correct decoding becomes possible after a resynchronization marker is generated after the bit containing the error.
In current standard methods for reducing error propagation, resynchronization markers, such as a slice start code and a group of blocks (GOB) start code (GBSC), are inserted into predetermined positions of the encoded bit stream, for example, starting sections of respective frames, slice starting sections when using a slice hierarchy, and GOB starting sections when using a GOB hierarchy.
However, more resynchronization markers should be inserted into a bit stream transmitted over a radio channel in which errors are more frequently generated. When the number of the resynchronization markers to be inserted is predetermined, the positions into which the resynchronization markers are to be inserted in the bit stream should be determined.
In order to conceal the GOB in which the error is generated during the recovery of a received video signal, all Macro Blocks (MBs) between the GBSC of the GOB in which the error is generated and the GBSC of the next GOB decoded thereafter, are recovered using the motion vectors of MBs of a previous GOB, in a conventional technology. FIG. 1 shows the data structure of the above-mentioned error concealment method. As shown in FIG. 1, the GBSC is sensed in the received bit stream and is decoded in respective GOBs 100, 102, 104, and 106. The value gn denotes a GOB number. The decoded GOBs 108, 110, 112, and 114 are recovered at each corresponding position of a frame 116. Here, when it is determined that the second GOB 102 has an error as a result of checking the GBSC of the third GOB 104, the decoded second GOB 110 is deleted. Then, the second GOB 110 is recovered by performing motion compensation using motion vectors in the first GOB 100.
However, since a resynchronization marker is defined only as the GBSC in a GOB header which is the starting point of the GOB in such a method, it is noted that the error propagates through at least one GOB.
Also, at the receiving end, a video signal is recovered by using motion vectors of transmitted MBs. Here, when an error is generated in the motion vectors of the MBs which are being recovered, the erroneous motion vector is predicted from the motion vectors of the MBs of a previous GOB. The prediction is performed by obtaining a median of the motion vectors of recovered MBs among peripheral blocks of the current MB. However, when the previous GOB is lost, it is difficult to recover the current MB since the prediction value of the motion vector of the current MB becomes 0.
Also, when an error is generated in a field showing the position of MBs in the GOB header or the slice header, the correct position of a block picture cannot be recovered from the corresponding MB due to the error. Therefore, a method for determining whether an error is generated in the field is required.
To solve the above problem, it is an object of the present invention to provide a method and an apparatus for transmitting a video signal in which resynchronization markers, which are shorter than a GOB, are also inserted into predetermined positions of a bit stream, other than the starting parts of a frame and a GOB, to prevent error propagation.
It is another object of the present invention to provide a method for recovering a video signal in which error-generated MBs are concealed.
Accordingly, to achieve the first object, there is provided a method for transmitting a video signal, wherein before a video signal having a hierarchical structure of a frame, groups of blocks (GOBs), and macro blocks is received and recovered, a transmitter inserts a plurality of resynchronization markers into each GOB to prevent the propagation of errors generated in a transmission channel, wherein the insertion of resynchronization markers includes: assigning the number of resynchronization markers to the respective GOBs and inserting the assigned resynchronization markers into predetermined positions of the corresponding GOB, wherein the positions are determined to minimize the mean error propagation cost based on whether respective macro blocks positioned between the resynchronization markers to be inserted are skipped.
To achieve the first object, there is provided a video signal transmitting apparatus for inserting a plurality of resynchronization markers into groups of blocks (GOBs) to prevent the propagation of errors generated in a transmission channel before a video signal, having a hierarchical structure of a frame, the GOBs, and macro blocks, is received and recovered, including: an encoder for encoding image data; a frame code storing unit for storing respective CODed macro block indication (COD) values determined by the encoder; a frame bitstream storing unit for storing a bit stream generated by the encoder; a resynchronization marker generator for determining the number and positions of the resynchronization markers to be inserted into the bit stream based on the COD values stored in the frame code storing unit and generating the resynchronization markers; and a resynchronization marker inserting unit for inserting the generated resynchronization markers into corresponding positions of the stored bit stream and transmitting the generated resynchronization markers.
To achieve the second object, there is provided a method for recovering a received video signal having a hierarchical structure of a frame, groups of blocks (GOBs), and macro blocks by inserting a plurality of resynchronization markers into the GOBs to prevent the propagation of errors generated in a transmission channel, including: detecting an error from a macro block between inserted resynchronization markers; deleting recovered data of a section in which the error is detected; and concealing the error of the section by replacing the deleted data section with the data of the immediately preceding concealed section.
To achieve the second object, there is provided a video signal recovering method for recovering an image from received motion vectors of the respective micro blocks of the video signal having a structure of a frame, groups of blocks (GOBs) and macro blocks, wherein the motion vector of an erroneous macro block is predicted by replacing the motion vector with the immediately preceding recovered motion vector.
To achieve the second object, there is provided a video signal recovering method for recovering a macro block in a position by reading a field showing the position of the macro block among headers of the block group in a video signal having a frame, GOBs, and macro blocks, wherein it is determined whether an error is generated in a field showing the position of the macro block by performing a parity check with respect to the macro block from the received video signal including a parity bit inserted into the field showing the position of the macro block.